home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
MacWorld 1997 August
/
Macworld (1997-08).dmg
/
Shareware World
/
Utilities
/
Text Processing
/
Alpha
/
Tcl
/
Menus
/
thinkRefMenu.tcl
< prev
next >
Wrap
Text File
|
1997-06-17
|
1KB
|
76 lines
#================================================================================
# THINK Ref
#================================================================================
if $startingUp {
set thinkRefMenu "•265"
addMenu thinkRefMenu
return
}
proc thinkRefMenu {} {}
menu -n $thinkRefMenu {
"gotoReference"
"(-"
"displayTrapTemplate"
"insertTrapTemplate"
"/L<O<UlookupTrap"
}
set lastTrap {}
proc insertTrapTemplate {} {
global lastTrap
launchForeAppl DanR
set text [getSelect]
if {![string length $text]} {
if {[catch {prompt "Trap name:" $lastTrap} text]} return
} else {
deleteText [getPos] [selEnd]
}
set lastTrap $text
set res [AEBuild -r {'DanR'} DanR {TMPL} "----" "“$text”"]
regexp {“.*”} $res one
insertText [string trim $one {“”}]
}
proc displayTrapTemplate {} {
global lastTrap
launchForeAppl DanR
set text {}
catch {set text [getSelect]}
if {![string length $text]} {
if {[catch {prompt "Trap name:" $lastTrap} text]} return
}
set lastTrap $text
set res [AEBuild -r {'DanR'} DanR {TMPL} "----" "“$text”"]
regexp {“.*”} $res one
alertnote [string trim $one {“”}]
}
proc lookupTrap {} {
global lastTrap
launchForeAppl DanR
set text {}
catch {set text [getSelect]}
if {![string length $text]} {
if {[catch {prompt "Trap name:" $lastTrap} text]} return
}
set lastTrap $text
set num 0
AEBuild {'DanR'} DanR {REF } "----" "“$text”"
}
proc gotoReference {} {
launchForeAppl DanR
}